Amortized Analysis

نویسنده

  • Michiel Smid
چکیده

In general, the running time of an algorithm depends on the efficiency of the data structure that is used to implement it. The algorithm performs, among other things, a sequence of operations on the data structure. In such cases, we are interested in the total time for a sequence of operations. In general, the time to perform a single operation may fluctuate—some operations may be “cheap”, whereas others may be “expensive”. What we want is that the total amount of time for all operations is not too large. Of course, this means that there should not be too many expensive operations. If, for example, each expensive operation is followed by a large number of cheap ones, then on the average, one operation is still cheap. We want to be able to analyze the time for a single operation, averaged over a sequence of operations. In these notes, we introduce the technique of amortized analysis as a tool for achieving this. We illustrate the technique for the implementation of a binary counter and for a special class of balanced binary search trees, the so-called BB[α]-trees.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Ics 691: Advanced Data Structures Lecture 2 2 Searching a List 2.1 Static Structure

In the last lecture we discussed amortized analysis and looked at the 3 methods: aggregate, accounting, and potential. We used these 3 methods to show that the amortized complexity of the binary counter problem is O(n). Finally, we applied amortized analysis to the problem of inserting data into dynamic arrays, showing that inserting n objects has an amortized cost of O(n), despite the worst-ca...

متن کامل

Type-Based Amortized Resource Analysis with Integers and Arrays

Proving bounds on the resource consumption of a program by statically analyzing its source code is an important and well-studied problem. Automatic approaches for numeric programs with side effects usually apply abstract interpretation–based invariant generation to derive bounds on loops and recursion depths of function calls. This paper presents an alternative approach to resource-bound analys...

متن کامل

Immediate Dominators in Linear Time An Elegant and Non-Amortized Algorithm EXTENDED ABSTRACT

Immediate Dominators in Linear Time An Elegant and Non-Amortized Algorithm EXTENDED ABSTRACT

متن کامل

The Amortized Bootstrap

We use amortized inference in conjunction with implicit models to approximate the bootstrap distribution over model parameters. We call this the amortized bootstrap, as statistical strength is shared across dataset replicates through a metamodel. At test time, we can then perform amortized bagging by drawing multiple samples from the implicit model. We find amortized bagging outperforms bagging...

متن کامل

A New Approach to Efficient Enumeration by Push-out Amortization

Enumeration algorithms have been one of recent hot topics in theoretical computer science. Different from other problems, enumeration has many interesting aspects, such as the computation time can be shorter than the total output size, by sophisticated ordering of output solutions. One more example is that the recursion of the enumeration algorithm is often structured well, thus we can have goo...

متن کامل

Amortized Resource Analysis with Polynomial Potential A Static Inference of Polynomial Bounds for Functional Programs (Extended Version)

In 2003, Hofmann and Jost introduced a type system that uses a potential-based amortized analysis to infer bounds on the resource consumption of (first-order) functional programs. This analysis has been successfully applied to many standard algorithms but is limited to bounds that are linear in the size of the input. Here we extend this system to polynomial resource bounds. An automatic amortiz...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2008